package com.market;

public class Market {
	Product[] productlist;
	String name;
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}public Product[] getProductlist() {
		return productlist;
	}public void setProductlist(Product[] productlist) {
		this.productlist = productlist;
	}
	public Product sell(String productName){
		for(int i=0;i<productlist.length;i++){
			if(productlist[i].getName() .equals(productName)){
				return productlist[i];
			}
		}
		return null;
	}
}
